Skip to content

Pin to 19.09#1563

Merged
michaelpj merged 3 commits intoIntersectMBO:masterfrom
michaelpj:imp/nixpkgs-19.09
Oct 31, 2019
Merged

Pin to 19.09#1563
michaelpj merged 3 commits intoIntersectMBO:masterfrom
michaelpj:imp/nixpkgs-19.09

Conversation

@michaelpj
Copy link
Contributor

We have a bunch of issues that are fixed in newer nixpkgs, and I've given up waiting for iohk-nix to move on. (I think it will happen, it just might be a matter of months still.)

This seems to go okay. There's an issue with the generated purescript which I'm looking into.

I'm putting this up partly so that things get cached by hydra.

@michaelpj michaelpj force-pushed the imp/nixpkgs-19.09 branch 3 times, most recently from db90a33 to af94f98 Compare October 29, 2019 14:33
@michaelpj
Copy link
Contributor Author

Argh: NixOS/nixpkgs#71480

@michaelpj michaelpj force-pushed the imp/nixpkgs-19.09 branch 2 times, most recently from f1bf12f to cfea7a5 Compare October 30, 2019 10:10
@michaelpj michaelpj marked this pull request as ready for review October 30, 2019 10:12
@michaelpj
Copy link
Contributor Author

Seems to work now!

I'd really appreciate @krisajenkins or @shmish111 having a look at the purescript stuff, since I have no idea what I'm doing. I had to:

  • Remove some "resolutions" from the package.json and redo the deps, since otherwise it complained that they were somehow "impossible".
  • Mess around with the builder code since yarn2nix now puts stuff in slightly different places.

There is one main annoyance which is that yarn2nix itself won't seem to build on hydra, for reasons I don't totally understand (but see the linked issues in the yarn2nix repo). So I had to leave it out of the update deps script, you can just uncomment that line when you want to use it and it'll work locally 🤷‍♂️

@michaelpj
Copy link
Contributor Author

There will be some followup stuff later, this is just getting things building.

@krisajenkins
Copy link
Contributor

If you've managed to remove the resolutions, that would be brilliant. But does it work on OSX and Nixos?

@michaelpj
Copy link
Contributor Author

But does it work on OSX and Nixos?

How do I tell if it works?

@krisajenkins
Copy link
Contributor

I'm trying it now. Wait for the screams and determine if they're "of pain" or "of joy".

@michaelpj
Copy link
Contributor Author

You might need to pull again, I made a stupid mistake when trying to fix the new hlints.

@krisajenkins
Copy link
Contributor

Hmm...I'm getting this:

Building library 'plutus-playground-usecases' for plutus-playground-server-0.1.0.0..
[1 of 5] Compiling CrowdFunding     ( usecases/CrowdFunding.hs, dist/build/plutus-playground-usecases/CrowdFunding.o )
[2 of 5] Compiling Game             ( usecases/Game.hs, dist/build/plutus-playground-usecases/Game.o )
[3 of 5] Compiling Messages         ( usecases/Messages.hs, dist/build/plutus-playground-usecases/Messages.o )
[4 of 5] Compiling Starter          ( usecases/Starter.hs, dist/build/plutus-playground-usecases/Starter.o )
[5 of 5] Compiling Vesting          ( usecases/Vesting.hs, dist/build/plutus-playground-usecases/Vesting.o )
/nix/store/b3chq9jg2vsf6v39jjf59wzx9qhn38lj-cctools-binutils-darwin/bin/ranlib: object: dist/build/plutus-playground-usecases/libHSplutus-playground-server-0.1.0.0-ZfMTD62Jrz99rLB0QgiTH-plutus-playground-usecases-ghc8.6.4.a(cryptlib.o) malformed object (unknown load command 1)
`ranlib' failed in phase `Ranlib'. (Exit code: 1)
builder for '/nix/store/jzabg29mniw7wjnd706vkd8jg4j8s91w-plutus-playground-server-0.1.0.0.drv' failed with exit code 1
cannot build derivation '/nix/store/0cm0a51p2xcz7n3bp5j9kj4p3grp1cr5-plutus-playground-server-6a174950c16fd9806d16ebaa91934bb9639184c1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/4dwfcrzr00j99vikcf7r1714pp4x5cyc-plutus-playground-purescript.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/h6fgwp96f594ad9xp7kvbqgbnfgdjnlc-plutus-playground-client.drv': 1 dependencies couldn't be built
error: build of '/nix/store/h6fgwp96f594ad9xp7kvbqgbnfgdjnlc-plutus-playground-client.drv' failed

...which is galling, because the 19.09 update's supposed to help with OSX compatibility.

@michaelpj
Copy link
Contributor Author

yikes

@michaelpj
Copy link
Contributor Author

It works on hydra's macOS builders... What version of macOS are you on? And can you try with sandboxing on?

@krisajenkins
Copy link
Contributor

I'm on 10.14 (Mojave). Hmm...sandboxing dies with a fascinatingly different error.

Installing .spago/web-xhr/v3.0.2.
done.
dyld: Library not loaded: /usr/lib/libz.1.dylib
  Referenced from: /nix/store/rvm2xjcsj1gc4nbgqa5srg31sx9xh9yg-purescript/bin/purs
  Reason: no suitable image found.  Did find:
        /usr/lib/libz.1.dylib: file system sandbox blocked stat()
        /usr/lib/libz.1.dylib: file system sandbox blocked stat()
/nix/store/lpwlxlyskgdj11disk9acqya6wd0sjp2-stdenv-darwin/setup: line 1358:  4663 Abort trap: 6           purs compile 'src/**/*.purs' 'test/**/*.purs' 'generated/**/*.purs' '../web-common/**/*.purs' '.spago/*/*/src/**/*.purs'
builder for '/nix/store/r8qq0s8kvrf3mpy5s58qx8pn2brrqikd-plutus-playground-client.drv' failed with exit code 134
error: build of '/nix/store/r8qq0s8kvrf3mpy5s58qx8pn2brrqikd-plutus-playground-client.drv' failed

@michaelpj
Copy link
Contributor Author

Yeah, https://logs.nix.samueldr.com/nix-darwin/2019-07-04 suggests it's something to do with the impure stuff in your environment. Have you got an old xcode lying around or something?

It looks like some things won't work without sandboxing off, so we might have to try and fix the impure stuff 😬

@michaelpj
Copy link
Contributor Author

@krisajenkins
Copy link
Contributor

Welcome to hell, here's your accordion.

Looks like Xcode might well be out of date on my machine. I'll try updating and rebuilding.

@michaelpj
Copy link
Contributor Author

Alternatively, try: --option sandbox true --option extra-sandbox-paths '/System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env' (stolen from that IRC history)

@michaelpj
Copy link
Contributor Author

Green 🎉

@krisajenkins
Copy link
Contributor

Ooh, that extra-sandbox-paths line worked. 🎉

@michaelpj
Copy link
Contributor Author

Does that mean it works? I haven't tried running it yet.

@michaelpj
Copy link
Contributor Author

Okay, I ran a local playground and it works. Given that it builds on darwin, I'm going to assume it probably works there too.

I'll add the sandboxing information to the readme. With that in mind, let's try this.

@michaelpj michaelpj merged commit ac0c72d into IntersectMBO:master Oct 31, 2019
@michaelpj michaelpj deleted the imp/nixpkgs-19.09 branch November 29, 2019 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants